<?php

/*
**	Twitter OAuth Initiation
**	This invisible page initiaties the OAuth process with twitter.
**
*/

if (isset($_GET['clear']) && $_GET['clear'] === 'true') {
    $this->session->unset_userdata('oauth_token');
    $this->session->unset_userdata('oauth_token_secret');
    die('cleared!');
}

$twitter = new EpiTwitter($this->config->item('twitter_consumer_key', 'ligature'), $this->config->item('twitter_consumer_secret', 'ligature'));

$params = array();

if (strtolower($mode) == 'forcelogin') {
    $params = array('force_login' => 'true');
}

redirect($twitter->getAuthenticateUrl(null, $params));

/* clickframes::version=3063174120::clickframes */
?>
